home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 019a / amac40.zip / RFR003.QM < prev    next >
Text File  |  1991-08-02  |  13KB  |  279 lines

  1. *                               RFR003.QM
  2. *                        Written By Tom Hogshead
  3. *                       [ See RFRMxx.QM For Use ]
  4. *                             August 2, 1991
  5. *  Key       Subfile                       Description
  6. * =====  ===============  ====================================================
  7. * ^(F3__)                 Formats PARAGRAPH (Fast And Small)
  8. * ^(F4__)                 Formats PARAGRAPH (Slow)
  9. * ^(F5__)                 Formats DOCUMENT With Blank Lines Forming PARAGRAPHS
  10. * ^(F6__)                 Formats BLOCK.  Must Position Cursor At BLOCK Begin
  11. * ^(F7__)                 Formats Message Reader Paragraph     (Tim Farley)
  12. * ^(F8__)                 Formats QMAC Txtfile BLOCK With Asterisks In Col 1
  13. *
  14. *          {e:\up\RFRM*}--Return To RFRMxx.QM
  15. *
  16. *-- eoi
  17.  
  18. * 
  19. * ┌─────────────────────────────────────────────────────────────────────┐
  20. * │^(F3__) Formats a paragraph.  (Macro has been around a long time)    │
  21. * └─────────────────────────────────────────────────────────────────────┘
  22. *
  23. ^F3 Macrobegin
  24.         Cursordown                      * move down one line
  25.         Prevpara                        * get to beginning of paragraph
  26.         Wrappara                        * reformat
  27.         Nextpara                        * go to begin next paragraph
  28. *
  29. * 8 bytes Wed  08-01-1990  10:47:36
  30.  
  31. * 
  32. * ┌─────────────────────────────────────────────────────────────────────┐
  33. * │^(F4__) Formats Paragraph Only.  Keeps in original indented position │
  34. * └─────────────────────────────────────────────────────────────────────┘
  35.  
  36. * To run, place cursor line anywhere in a paragraph, and press ^F4.
  37. * This macro yields the same formatted paragraph as does ^F3 if
  38. * the right margin is set to 69 in the QEdit menu or in QCONFIG.DAT.
  39. * If there are asterisks in column 1 they are also formatted as part of
  40. * the paragraph.
  41.  
  42. ^F4 Macrobegin
  43.         Unmarkblock                     * Get ready
  44.         Cursordown                      * Get into paragraph
  45.         Prevpara                        * Get to paragraph begin
  46.         Markcolumn                      * Mark column
  47.         Endpara                         * Get to paragraph end
  48.         Gotocolumn "512" Return         * Get all paragraph in block
  49.         Markcolumn                      * Mark paragraph
  50.         Gotoblockbeg                    * Get to paragraph begin
  51.  JFalse END:                            * No block? End
  52.         Cut                             * Get into scrap
  53.         Editfile "C:$" Return           * Load C:$ (temp file)
  54.         Paste                           * Paste block to C:$
  55.         Setrmargin "69" Return **       * Set rt margin to 69
  56.                                         ** change "69" as needed
  57.         Wrappara                        * Format block
  58.         Setrmargin "80" Return          * Set rt margin to 80
  59.         Begfile                         * Get to block begin
  60.         Markcolumn                      * Mark
  61.         Endfile                         * Mark end block
  62.         Gotocolumn "69" Return **       * Get all block marked
  63.                                         ** change "69" as needed
  64.         Copy                            * Get formatted block to scrap
  65.         Killfile Quit                   * Kill/quit C:$
  66.         Paste                           * Put back formatted, marked
  67.         Begline
  68.         Makectrofscreen                 * Better view
  69.  END:
  70. *
  71. * 60 bytes Tue  09-11-1990  19:12:08
  72.  
  73. ***************************** (TEST1) PARAGRAPH ******************************
  74. *       (remove * in column 1 before testing)
  75. *
  76. *       This is a (test) paragraph.
  77. *                Place the cursor line anywhere in this paragraph to run.
  78. *                Press ^F4 at the same time.
  79. *                Be sure AutoIndent is ON.  (Long line for test )==>>>>>>>>>>>> ***************************************** ***************************************** ***************************************** ***************************************** ***************************************** *****************************************
  80.  
  81. * 
  82. * ┌─────────────────────────────────────────────────────────────────────┐
  83. * │^(F5__) Formats complete document with blank lines forming paragraphs│
  84. * └─────────────────────────────────────────────────────────────────────┘
  85. *
  86. ^F5 MacroBegin
  87.         Unmarkblock                     * Unmark
  88.         Begfile                         * Get to file begin
  89.         Setrmargin "69" Return          * Set new right margin
  90.    FORMAT:                              *
  91.    Jfalse FINISH:                       * No more para? go to FINISH
  92.         WrapPara                        * Reformat
  93.         NextPara                        * Get to begin next paragraph
  94.    Jump FORMAT:                         *
  95.    FINISH:                              * No more paragraphs
  96.         Setrmargin "80" Return          * Reset right margin
  97. *
  98. * 26 bytes Wed  09-12-1990  16:47:
  99.  
  100. * 
  101. * ┌─────────────────────────────────────────────────────────────────────┐
  102. * │^(F6__) Formats Block.  Must position cursor at beginning of block   │
  103. * └─────────────────────────────────────────────────────────────────────┘
  104. * To run, position the 'cursor' at the beginning of the block to
  105. * reformat.  Press ^F6, then cursor down to bottom of block to
  106. * reformat.  Press 'Enter' when the block is marked.  This macro differs
  107. * from ^F8 in that the starting position of the block to be
  108. * reformatted is selected by the starting position of the cursor; in
  109. * ^F8 the block starting POSITION is selected by the starting
  110. * position of the cursor line.
  111.  
  112. *
  113. ^F6 Macrobegin
  114.         Unmarkblock                     * Get ready
  115.         Gotocolumn "512" Return         * Get all block to format
  116.         Markcolumn                      * Mark begin of block
  117.         Prevposition                    *
  118.         Begline                         *
  119.         Prevposition                    *
  120.         Makectrofscreen                 * See better
  121.         Cursordown                      * Position to cursor down
  122.         Pause                           * Cursor to end, then 'Enter'
  123.         Markcolumn                      * Mark end of block
  124.         Gotoblockbeg                    * Get to block begin
  125.  JFalse END:                            * No block? End
  126.         Cut                             * Get into scrap
  127.         Editfile "C:$" Return           * Load C:$ (temp file)
  128.         Paste                           * Paste block to C:$
  129.         Setrmargin "69" Return **       * Set rt margin to 69
  130.                                         ** change "69" as needed
  131.         Wrappara                        * Format block
  132.         Setrmargin "80" Return          * Reset rt margin to 80
  133.         Begfile                         * Get to block begin
  134.         Markcolumn                      * Mark
  135.         Endfile                         * Mark endblock
  136.         Gotocolumn "69" Return **       * Get all block marked
  137.                                         ** change "69" as needed
  138.         Copy                            * Get formatted block to scrap
  139.         Killfile Quit                   * Kill/quit C:$
  140.         Pasteover                       * Put back formatted, marked
  141.         Makectrofscreen                 * Better view
  142.  END:
  143. *
  144. * 62 bytes Tue  09-11-1990  19:09:31
  145.  
  146. ***************************** (TEST2) PARAGRAPH ***************************
  147.  
  148. *        This is a test block.  To format, place the "cursor" on "T" in
  149. *               in "this" on line 1.  Then press ^F6 and cursor down to
  150. *               block end.  When the block has been marked press
  151. *               'Enter'.
  152. *               Asterisks need not be removed.
  153.  
  154. * 
  155. *┌───────────────────────────────────────┐
  156. *│^(F7__) Format Message Reader Paragraph│
  157. *└───────────────────────────────────────┘
  158. * Here's a handy macro from Tim Farley of SemWare to reformat a message
  159. * reader paragraph.  Remember, paragraphs are reformatted to the width
  160. * of the right margin setting, so set as needed.
  161. *
  162. * =========================================================================
  163. * Date: 10-01-90 (19:09)           Number: 3041         SemWare Support BBS
  164. *   To: DAN SNAPPER                Refer#: 3028
  165. * From: TIM FARLEY                   Read: YES
  166. * Subj: Message reformat macro       Conf: (21) ILink
  167. * ------------------------------------------------------------------------
  168. * DS>   Does anyone have a macro to reformat a quoted 'off-line'
  169. * DS>   message paragraph and then reinsert the quotes back?
  170. * DS>
  171. * DS>
  172. * DS>
  173. *
  174. * Here it is:
  175. *
  176. *
  177. * Reader Paragraph Reform
  178. *   Mark a line block, hit this key, and it will reform the text, leaving
  179. *   all "II>" quoting on the left alone.
  180. *
  181. *   Assumes that ">" is the last character of the "quoting" mark.
  182. *   Also assumes that WordWrap is currently on when you hit it,
  183. *   and that there is a currently marked block.
  184. *
  185.  
  186. ^F7  MacroBegin OneWindow
  187.      GotoBlockBeg GotoBlockEnd JTrue doit: MarkLine GotoBlockEnd
  188.    doit:
  189.      ToggleWordWrap EndLine #254 ToggleWordWrap
  190.      GotoBlockBeg GotoColumn "16" Return Find ">" Return "BL" Return
  191.      JTrue foundit:
  192.      BegLine
  193.    foundit:
  194.      CursorRight
  195.      UnmarkBlock MarkColumn Find #254 Return "N" Return
  196.      GotoColumn "512" Return MarkColumn BegLine GotoBlockBeg
  197.      Cut
  198.      MarkLine CopyBlock CopyBlock CopyBlock UnmarkBlock
  199.      HorizontalWindow EditFile "$$$$$$$$.tmp" Return
  200.      BegFile BegLine         * Top of files in case it was already here
  201.      InsertLine InsertLine   * ??
  202.      Paste UnMarkBlock       * put block in place
  203.      EndFile AddLine BegFile * mandatory blank line on end
  204.    more:
  205.      WrapPara                * wrap each para
  206.      JTrue more:             * until none left
  207.      DelLine
  208.      BegFile BegLine
  209.      Find Return Return      * find our goofy char again
  210.      DelCh                   * and delete it
  211.      GotoColumn "512" Return MarkColumn BegFile BegLine MarkColumn
  212.      Cut Quit PrevWindow OneWindow
  213.      Paste GotoBlockEnd CursorDown BegLine UnMarkBlock
  214. *
  215. * 132 bytes Tue  10-02-1990  16:51:06 (added TH)
  216.  
  217. * This macro is too long for QCONFIG, you'll have to use QMAC to
  218. * compile it.  Then put the compiled macro files in some directory,
  219. * and add the following option to the command line your reader runs
  220. * QEdit with:
  221. *
  222. *      /Ld:\dir\filename.ext
  223. *
  224. * where D:\DIR\FILENAME.EXT is the full drive, path, and name of
  225. * the compiled binary macro file.
  226. *
  227. * I've used this macro myself to reformat quotes, for over a year
  228. * now.
  229. *
  230. * --Tim Farley
  231. *   SemWare Technical Support
  232.  
  233. * 
  234. * ┌─────────────────────────────────────────────────────────────────────┐
  235. * │^(F8__) Formats QMAC txtfile block with asterisk in column 1         │
  236. * └─────────────────────────────────────────────────────────────────────┘
  237. * To run, position the 'cursor line' on the first line of the block to
  238. * reformat.  Press ^F8, then cursor down to bottom of block to
  239. * reformat.  To reformat, press 'Enter' when the block is marked.  This
  240. * macro differs from ^F6 in that the block does not include the
  241. * asterisk and blank space; in ^F6 the block starting position is
  242. * selected by the starting position of the cursor line.  This macro
  243. * also differs from ^F4 which formats a paragraph from first blank line
  244. * which has no text or asterisk on line to last blank line.
  245. *
  246. *
  247. ^F8 Macrobegin
  248.         Unmarkblock                     * Get ready
  249.         Gotocolumn "512" Return         * Get all block to format
  250.         Markcolumn                      * Mark begin of block
  251.                 Begline                 * Start at line begin
  252.                 Wordright               * Get to first word on line
  253.         Cursordown                      * Position to cursor down
  254.         Makectrofscreen                 * See better
  255.         Pause                           * Cursor to end, then 'Enter'
  256.         Markcolumn                      * Mark end of block
  257.         Gotoblockbeg                    * Get to block begin
  258.  JFalse END:                            * No block? End
  259.         Cut                             * Get into scrap
  260.         Editfile "C:$" Return           * Load C:$ (temp file)
  261.         Paste                           * Paste block to C:$
  262.         Setrmargin "69" Return **       * Set rt margin to 69
  263.                                         ** change "69" as needed
  264.         Wrappara                        * Format block
  265.         Setrmargin "80" Return          * Reset rt margin to 80
  266.         Begfile                         * Get to block begin
  267.         Markcolumn                      * Mark
  268.         Endfile                         * Mark endblock
  269.         Gotocolumn "69" Return **       * Get all block marked
  270.                                         ** change "65" as needed
  271.         Copy                            * Get formatted block to scrap
  272.         Killfile Quit                   * Kill/quit C:$
  273.         Pasteover                       * Put back formatted, marked
  274.         Makectrofscreen                 * Better view
  275.  END:
  276. *
  277. * 61 bytes Tue  09-11-1990  19:21:48
  278.  
  279.